<template>
  <div id="app">
    <div id="nav">
      <router-link to="/" exact>Home</router-link>|
      <router-link to="/about">About</router-link>|
      <router-link to="/list">列表与传参</router-link>|
      <router-link to="/nested">嵌套路由</router-link>|
      <router-link to="/permission">路由守卫</router-link>|
      <router-link to="/test-404-asdf">Test404</router-link>
    </div>

    <div style="position: relative;">
      <transition name="fade">
      <router-view />
    </transition>
    </div>
  </div>
</template>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;
}

#nav a {
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-active {
  color: #42b983;
}

.fade-enter-active,
.fade-leave-active {
  transition: all 0.5s;
}
.fade-enter {
  opacity: 0;
  transform: translateY(300px);
}
.fade-leave-to {
  opacity: 0;
  /* height: 0; */
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  transform: translateY(-300px);
}
</style>
